class DataConverter:
    @staticmethod
    def convert_results_to_objects(results, obj_class):
        objects = []
        for row in results:
            obj = obj_class(*row)
            objects.append(obj)
        return objects

    @staticmethod
    def convert_objects_to_json(objects):
        json_list = []
        for obj in objects:
            json_list.append(obj.__dict__)  # 使用对象的 __dict__ 属性将对象转换为字典
        return json_list